<?php
$this->breadcrumbs=array(
	'people',
);

$this->menu=array(
	array('label'=>'新建 联络人', 'url'=>array('create')),
	array('label'=>'管理 联络人', 'url'=>array('admin')),
);
?>

<p>
    你可以输入一个查询操作 (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
    or <b>=</b>) 在下面空白的栏位或下拉菜单.仅支持简体字查询.
</p>
<?php



$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'person-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    //'dataProvider' => $dataProvider,
    'columns' => array(
        // 'id',
        array('name' => 'id', 'type' => 'raw', 
            'filter' => false, 
            'value' => 'CHtml::link($data->id, array("view", "id"=>$data->id))', 'htmlOptions' => array('width' => '50px')),
        array(// display 'department.name' using an expression
            'header' => '部门',
            'name' => 'departmentId',
            'value' => '$data->department->name',
            'filter' => CHtml::listData(Department::model()->findAll(), 'id', 'name'),
            'headerHtmlOptions' => array('width' => '70'),
            'htmlOptions' => array('align' => 'center'),
        ),
        array(// display 'door.name' using an expression
            'header' => '职称',
            'name' => 'titleID',
            'value' => '$data->title->name',
            'filter' => CHtml::listData(Title::model()->findAll(), 'id', 'name'),
            'headerHtmlOptions' => array('width' => '70'),
            'htmlOptions' => array('align' => 'center'),
        ),
        'name',
        'mobile',
        'Ext',
        'short',
        'skype',
        array(
            'name' => 'mail',
            'type' => 'raw',
            'value' => 'CHtml::link(CHtml::encode($data->mail), "mailto:".CHtml::encode($data->mail))',
        ),
        'memo',
    ),
));
?>
